package main

import (
	"shop-api/app"
	"shop-api/startup"
	"shop-common/engine"
)

const SHOP_API = "shop-api"

// @title 商城前台 API
// @version 0.0.1
// @description 商城前台
// @host localhost:9002
// @securityDefinitions.apikey ApiKeyAuth
// @in header
// @name Authorization
func main() {
	application := &engine.WEBApplication{
		Application: &engine.Application{
			Name:      SHOP_API,
			SetupApp:  startup.SetupApp,
			SetupVars: startup.SetupVars,
		},
		CreateTables:      startup.Migrate,
		ServiceImpl:       startup.RegisterService,
		RegisterHttpRoute: startup.RegisterHttpRoute,
	}
	app.RunApplication(application)
}
